<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:if test="#request.page.currentpage <= 1">
            首页&nbsp;上一页&nbsp;
        </s:if>
        <s:else>
            <a href="javascript:turnto('1')">首页</a>&nbsp;<a href="javascript:turnto('<s:property value="#request.page.currentpage - 1"/>')">上一页</a>
        </s:else>

        <s:if test="#request.page.currentpage >= #request.page.totalpages">
            下一页&nbsp;尾页&nbsp;
        </s:if>
        <s:else>
            <a href="javascript:turnto('<s:property value="#request.page.currentpage + 1"/>')" >下一页</a>&nbsp;
            <a href="javascript:turnto('<s:property value="#request.page.totalpages" default="0"/>')">尾页</a>&nbsp;
        </s:else>
        共<s:property value="page.totalpages" default="0"/>页
        <s:textfield name="page.currentpage" id="currentpage" size="3" value="%{page.currentpage}"></s:textfield> 
        <a href="javascript:topage()" class="go">跳转</a>
<script type="text/javascript">
    function topage() {
        var pagenum = document.getElementById("currentpage").value;
        window.location.href = encodeURI("<s:property value="#request.page.url" />&currentpage=" + pagenum);
    }
    function turnto(page) {
        window.location.href = encodeURI("<s:property value="#request.page.url" />&currentpage=" + page);
    }
</script>